<?php defined('SYSPATH') or die('No direct script access.');

class Model_Comment extends ORM
{
    /**
     * @param $user
     * @param $asin
     * @param $text
     *
     * @return mixed
     */
    public static function addComment($user, $asin, $text)
    {
        return self::factory('comment')
            ->set('user', $user)
            ->set('asin', $asin)
            ->set('text', $text)
            ->set('time', time())
            ->save()
            ->id;
    }


}